<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>E-allert web page</title>
<script src="http://maps.google.com/maps?file=api&v=2&key={{ API_KEY }}"
  type="text/javascript"></script>
<script src="http://www.google.com/uds/api?file=uds.js&v=1.0&key={{ API_KEY }}"
  type="text/javascript"></script>
<script src="http://www.google.com/uds/solutions/localsearch/gmlocalsearch.js"
  type="text/javascript"></script>
<style type="text/css">
  @import url("http://www.google.com/uds/css/gsearch.css");
  @import url("http://www.google.com/uds/solutions/localsearch/gmlocalsearch.css");
</style>
<link type="text/css" rel="stylesheet" href="/stylesheets/main.css" />
</head>

<body onunload="GUnload()">
<h1>E-allert list and form</h1>

<table>
  <tr>
    <td>
      <form enctype="multipart/form-data" method="post" action="/send">
        <table>
          {{ form.as_table }} 
          <tr><th><label for="id_img">Photo:</label></th><td><input type="file" id="id_img" name="img"/></td></tr>
        </table>
        <input type="submit" value="Send allert"/>
      </form>
    </td>
    <td>
      <div id="div_id_geo_pos"></div>
    </td>
  </tr>
</table>
<hr>
<table cellspacing="0" class="allerts" id="timeline">
  <tbody id="timeline_body">
{% for allert in allert_list %}
    <tr class="hallert" id="allert">
      <td class="thumb photo">
        {% if allert.picture %}
            <a href="/pic_view?k={{ allert.key }}" class="pic_url">
              <img src="/thumb?k={{ allert.key }}" border="0">
            </a>
        {% else %}
          <img src="/static/noimage.jpg">
        {% endif %}
      </td>
      <td class="allert-sender">
        {% if allert.sender %}
          <b>{{ allert.sender.nickname }} wrote:</b>
        {% else %}
          An anonymous person wrote:
        {% endif %}
      </td>
      <td class="allert-body"><div><blockquote>{{ allert.description|escape }}</blockquote></div></td>
      <td class="allert-map"><div><a class="show-map" href="/map?k={{ allert.key }}" id="maps_link" title="Show Map">Click to view the map.</a></div></td>
    </tr>
{% endfor %}
  </tbody>
</table>
</body> </html>
